package tianhao.luo.linkedlist;

import lombok.Data;

/**
 * 模拟带头节点的单链表
 *
 * 每一个HeroNode都是一个节点
 * @author: tianhao.luo@hand-china.com 2021/6/14  9:35
 */
@Data
public class HeroNode {
    public int no;
    private String name;
    private String nickName;
    // 下一个节点
    public HeroNode next;

    public HeroNode(int no, String name, String nickName) {
        this.no = no;
        this.name = name;
        this.nickName = nickName;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("HeroNode{");
        sb.append("no=").append(no);
        sb.append(", name='").append(name).append('\'');
        sb.append(", nickName='").append(nickName).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
